#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+7;
int e[N], ne[N*2], h[N], idx;
int deg[N];
int n, m;
bool vis[N];
int order[N], tot;
void add(int a, int b) {
  e[idx]=b,ne[idx]=h[a],h[a]=idx++;
}
bool toposort() {
  queue<int> q;
  for(int i=1; i<=n; ++i) {
    if(deg[i]==0) q.push(i);
  }
  while(q.size()) {
    int u = q.front(); q.pop();
    order[tot++] = u;
    vis[u] = true;
    for(int i=h[u]; i!=-1; i=ne[i]) {
      int v = e[i];
      deg[v] --;
      if(!vis[v] && deg[v]<=0) {
        q.push(v);
      }
    }
  }
  return tot==n;
}
int main() {
  cin>>n>>m;
  memset(h, -1, sizeof( h));
  while(m--) {
    int x, y; cin>>x>>y;
    deg[y]++;
    add(x, y);
  }
  
  if(toposort()) for(int i=0; i<tot; ++i) {
    cout<<order[i]<<' ';
  }
  else cout<<-1;
  cout<<'\n';
}
